<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<div id="app">
  <!--lazy修饰符，阻止实时绑定，失去焦点或回车才会实现双向绑定-->
  <input type="text" v-model.lazy="message">
  <h2>{{message}}</h2>
  <!--number-->
  <input type="number" v-model.number="number">
  <h2>{{number}}{{typeof number}}</h2>
  <!--trim-->
  <input type="text" v-model.trim="name">
  <h2>{{name}}{{typeof name}}</h2>
</div>


<script src="../js/vue.js"></script>
<script>
  const app = new Vue({
    el: '#app',
    data: {
      message: "你好",
      number: 15,
      name: ''
    }
  })
</script>
</body>
</html>
